﻿ using System.ComponentModel; 
using System.Text;

namespace  NTTDATA.BEENChina.ResultCertification.PropertyGridUtil.CustomObject
{
    [TypeConverter(typeof(CustomConverter))]
    public class ElementLength : PropertyData
    {
        private int _row = -1;
        private int _col = -1;
        public int Row { get { return _row; } set { _row = value; } }
        public int Column { get { return _col;  } set { _col = value; } }
        public int Length { get; set; }

        #region PropertyData impl
        public  string GetDisplayName()
        {
            return this.Row.ToString() + " " + this.Column.ToString() + " " + this.Length.ToString();
        }

        public  string GetDescription()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(this.Row);
            sb.Append(",");
            sb.Append(this.Column);
            sb.Append(",");
            sb.Append(this.Length);


            return sb.ToString();
        }

        public  string GetValue()
        {
            return "row:" + this.Row.ToString() + ",col:" + this.Column.ToString() + ",len:" + this.Length.ToString();
        }
        #endregion
    }
}
